﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Planisoft.Entities;
using Planisoft.DAO;

namespace Planisoft.DAO
{
    public class UbigeoDistritoDAO:MasterDataAcces, IUbigeoDistritoDAO
    {

        public List<UbigeoDistrito> GetAllFromDistrito()
        {
            var query = from c in Context.UbigeoDistritoes
                            orderby c.DescUbiDtto
                            select c;

            return query.ToList();

        }


        public List<UbigeoDistrito> GetFromDistritoByProvinciaId(int idProv)
        {
            var query = from p in Context.UbigeoDistritoes
                        where p.IdUbiProv.Equals(idProv)
                        select p;

            return query.ToList();  
        }
    }
}
